package com.fz.entity;

import com.fz.core.BaseEntity;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

/**
 * <p>
 * 存储系统角色信息
 * </p>
 *
 * @author hyr
 * @since 2025-06-18
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Role extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 角色名称
     */
    private String name;

    /**
     * 角色描述
     */
    private String description;

    /**
     * 角色权限列表
     */
    private String permission;

    /**
     * 状态（0=冻结，1=正常）
     */
    private Boolean status;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    private LocalDateTime updateTime;

    /**
     * 逻辑删除（1=删除）
     */
    private Integer isDeleted;

    public Role(long id, boolean status) {
        super(id);
        this.status = status;
    }


    public Role(String name, String description, String permission) {
        this.name = name;
        this.description = description;
        this.permission = permission;
        status = true;
    }

    public Role(long id, String name, String description, String permission) {
        super(id);
        this.name = name;
        this.description = description;
        this.permission = permission;
        status = true;
    }
}
